CREATE TABLE [dbo].[ArchiveReport]
(
[Id] [int] NOT NULL IDENTITY(1, 1),
[UserId] [int] NOT NULL,
[TemplateId] [int] NOT NULL,
[Name] [varbinary] (max) NOT NULL,
[DateCreated] [datetime] NOT NULL,
[Deleted] [bit] NOT NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[ArchiveReport] ADD CONSTRAINT [PK_ArchiveReport] PRIMARY KEY CLUSTERED  ([Id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ArchiveReport] ADD CONSTRAINT [FK_ArchiveReport_WordTemplate] FOREIGN KEY ([TemplateId]) REFERENCES [dbo].[WordTemplate] ([Id])
GO
ALTER TABLE [dbo].[ArchiveReport] ADD CONSTRAINT [FK_ArchiveReport_UserInfo] FOREIGN KEY ([UserId]) REFERENCES [dbo].[UserInfo] ([Id])
GO
